CRU TS 4.04 daily interpolations from monthly data:
path <- "/path/to/CRU/4.04/"
tmin <- file.path(path, "cru_ts4.04.1901.2019.tmn.dat-clim-1961-1990-int.nc")
tmax <- file.path(path, "cru_ts4.04.1901.2019.tmx.dat-clim-1961-1990-int.nc")
output_filename <- file.path(path, "cru_ts4.04-clim-1961-1990-daily.tmp.nc")
codos::daily_temp(tmin = list(filename = tmin, id = "tmn"),
tmax = list(filename = tmax, id = "tmx"),
output_filename = output_filename)
"cru_ts4.04-clim-1961-1990-daily.tmp.nc"
tmp)codos::nc_gs("cru_ts4.04-clim-1961-1990-daily.tmp.nc", "tmp", thr = 0, cpus = 10)
"cru_ts4.04-clim-1961-1990-daily.tmp-gs.nc"
Padul location: 37.0108, -3.6039
Tmp <- codos:::nc_var_get(file.path(path, "cru_ts4.04-clim-1961-1990-daily.tmp-gs.nc"), "tmp")
lat <- codos:::nc_var_get(file.path(path, "cru_ts4.04-clim-1961-1990-daily.tmp-gs.nc"), "lat")
lon <- codos:::nc_var_get(file.path(path, "cru_ts4.04-clim-1961-1990-daily.tmp-gs.nc"), "lon")
idx_y <- which.min(abs(lat$data - 37.0108))
idx_x <- which.min(abs(lon$data + 3.6039))
aux <- Tmp$data[c(idx_x, idx_x + 1), c(idx_y - 1, idx_y)]
rownames(aux) <- lat$data[c(idx_y, idx_y - 1)]
colnames(aux) <- lon$data[c(idx_x, idx_x + 1)]
aux
#> -3.75 -3.25
#> 37.25 15.9465 14.80801
#> 36.75 15.2319 11.76962
(modern_tmp <- mean(aux))
#> [1] 14.43901
T_djf and T_jja:padul <- readr::read_csv("/path/to/padul.csv")
padul_tmp <- rowMeans(padul[, c("T_djf", "T_jja")])
past_co2 <- purrr::map_dbl(padul$`Age (cal yr BP)`, codos::past_co2)
padul2 <- tibble::tibble(age = padul$`Age (cal yr BP)`,
past_temp = padul_tmp,
past_co2 = past_co2,
modern_co2 = 340,
present_t = modern_tmp,
recon_mi = padul$MI)
MIpadul2$corrected_mi <- codos::corrected_mi(padul2$present_t,
padul2$past_temp,
padul2$recon_mi,
padul2$modern_co2,
padul2$past_co2)
# Small subset
knitr::kable(head(padul2, 10), "html")
|
age |
past_temp |
past_co2 |
modern_co2 |
present_t |
recon_mi |
corrected_mi |
|---|---|---|---|---|---|---|
|
-62 |
13.15918 |
368.020 |
340 |
14.43901 |
0.425809 |
0.1244634 |
|
-56 |
12.86272 |
368.020 |
340 |
14.43901 |
0.471798 |
0.1333827 |
|
-50 |
11.88472 |
364.900 |
340 |
14.43901 |
0.506921 |
0.0648281 |
|
-43 |
13.09339 |
353.835 |
340 |
14.43901 |
0.566461 |
0.3244211 |
|
-38 |
12.20387 |
346.520 |
340 |
14.43901 |
0.528049 |
0.2154220 |
|
-31 |
11.87980 |
337.155 |
340 |
14.43901 |
0.522880 |
0.2199217 |
|
-25 |
11.49567 |
331.960 |
340 |
14.43901 |
0.562884 |
0.2397781 |
|
-19 |
12.52563 |
325.080 |
340 |
14.43901 |
0.438233 |
0.2817604 |
|
-13 |
12.88969 |
318.840 |
340 |
14.43901 |
0.468382 |
0.3919461 |
|
-6 |
13.13016 |
315.340 |
340 |
14.43901 |
0.483879 |
0.4577505 |
Check out and download the entire dataset in Appendix A5.
P_annApproximated as the ratio
multiplied by reconstructed P_ann.
mi_ratio <- padul2$corrected_mi / padul2$recon_mi
padul2$corrected_P_ann <- padul$P_ann * mi_ratio
|
age |
past_temp |
past_co2 |
modern_co2 |
present_t |
recon_mi |
corrected_mi |
corrected_P_ann |
|---|---|---|---|---|---|---|---|
|
-62 |
13.15918 |
368.020 |
340 |
14.43901 |
0.425809 |
0.1244634 |
134.10868 |
|
-56 |
12.86272 |
368.020 |
340 |
14.43901 |
0.471798 |
0.1333827 |
143.22784 |
|
-50 |
11.88472 |
364.900 |
340 |
14.43901 |
0.506921 |
0.0648281 |
72.96858 |
|
-43 |
13.09339 |
353.835 |
340 |
14.43901 |
0.566461 |
0.3244211 |
360.93231 |
|
-38 |
12.20387 |
346.520 |
340 |
14.43901 |
0.528049 |
0.2154220 |
225.75760 |
|
-31 |
11.87980 |
337.155 |
340 |
14.43901 |
0.522880 |
0.2199217 |
219.29077 |
|
-25 |
11.49567 |
331.960 |
340 |
14.43901 |
0.562884 |
0.2397781 |
245.70561 |
|
-19 |
12.52563 |
325.080 |
340 |
14.43901 |
0.438233 |
0.2817604 |
317.69280 |
|
-13 |
12.88969 |
318.840 |
340 |
14.43901 |
0.468382 |
0.3919461 |
451.31183 |
|
-6 |
13.13016 |
315.340 |
340 |
14.43901 |
0.483879 |
0.4577505 |
520.45909 |
Check out and download the entire dataset in Appendix A5.
MI: Past CO2 calculated using meanage < 5kage < 5kP_ann: Past CO2 calculated using meanage < 20k